package cn.ryh.designpatterndemo.prototypepattern;


/**
 * @ClassName prototype
 * @Description TODO
 * @Author RaoYH
 * @Date 2019/4/23
 */
public class Prototype implements Cloneable  {

    public Prototype(){
        System.out.println("Prototype 构造函数执行");
    }
    @Override
    public Prototype clone() {
        Prototype prototype = null;
        try {
            prototype = (Prototype)super.clone();
        } catch (CloneNotSupportedException e) {
           e.printStackTrace();
        }
        return prototype;
    }
}
